1. Field of the Invention
This present invention concerns a method for the compression of interpreted object code by the factorisation of arborescent expressions.
2. Description of the Prior Art
In general, it is known that embedded systems which have data processing resources, such as smartcards (with microprocessor) or analogue cards for example, are designed so as to execute object codes obtained by the compilation of a source program, usually written in a high-level language. As a consequence, these systems comprise an interpreter which performs software interpretation of the instructions of the object code into machine-code instructions which are directly executable by the microprocessor. This interpreter can be installed, for example, in a memory associated with the microprocessor, in general a read-only memory (ROM) or a programmable memory.
It so happens that many applications use embedded systems which are as small as possible, and this involves limiting the size of memories and therefore of the application programs used.
With the aim of partially surmounting this problem, a proposal has been put forward for compacting the source code.
However, this solution has the disadvantages that it cannot be used in the event that one does not have the source code (which is the case most of the time) and the requirement to instrument the generator of interpreted object code, which is a highly complex tool.
Furthermore, a proposal has also been made to perform compacting of the interpreted object code by searching in the object code for successive identical standard instruction sequences, and counting the occurrences of these identical sequences. A test to decide whether this number of occurrences is greater than a reference number is then used to decide whether or not to create a specific code instruction with which the sequence is associated. A replacement for each occurrence of the sequence by the specific instruction code is effected in the interpreted object code in order to generate a compacted object code with which an execution file is associated.
In fact, this compression method performs a factorisation of instruction groups in the program in interpreted object code.